<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
            var num1=parseInt(prompt("请输入一个整数"));
            var num2=prompt("请输入一个运算符号:1.+2.-3.×4.÷");
            var num3=parseInt(prompt("请输入第二个整数"));
            function dengYu(x,ope,y){
                if(ope=="1"){
                    return x+y;
                }else if(ope=="2"){
                    return x-y;
                }else if(ope=="3"){
                    return x*y;
                }else if(ope=="4"){
                    if(y==0){
                        return "除数不能为0";
                    }else{
                        return x/y;
                    }
                }else{
                    return "输入错误";
                }
            }
            alert(dengYu(num1,num2,num3));
		</script>
	</body>

</html>